package com.example.demo.contrller;

import com.example.demo.model.ExcelDataDo;
import com.example.demo.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/demo")
public class ExcelTestContrller {

    @Autowired
    private TestService service;

    @GetMapping("/excel")
    public List<ExcelDataDo> testExcel(@RequestParam String insCode,@RequestParam String insNm,@RequestParam String score) {
        System.out.println("$$$$$$$$$$$$$$$$$$$$$");
        ExcelDataDo excelDataDo = new ExcelDataDo();
        excelDataDo.setInsCode(insCode);
        excelDataDo.setScore(score);
        excelDataDo.setInsNm(insNm);
        List<ExcelDataDo> test = service.test(excelDataDo);
        System.out.println("#####################");
        return test;
    }
}
